Home | History | Annotate | Download | only in cfm_AutotestSmokeTest
      1 # Copyright 2017 The Chromium OS Authors. All rights reserved.
      2 # Use of this source code is governed by a BSD-style license that can be
      3 # found in the LICENSE file.
      4 
      5 import os
      6 
      7 from autotest_lib.client.bin import test
      8 from autotest_lib.client.common_lib.cros import chrome
      9 
     10 
     11 class cfm_AutotestSmokeTest(test.test):
     12     """
     13     Starts a web browser and verifies that nothing crashes.
     14     """
     15     version = 1
     16 
     17     def run_once(self):
     18         """
     19         Runs the test.
     20         """
     21         with chrome.Chrome(init_network_controller = True) as cr:
     22             cr.browser.platform.SetHTTPServerDirectories(self.bindir)
     23             self.tab = cr.browser.tabs[0]
     24             self.tab.Navigate(cr.browser.platform.http_server.UrlOf(
     25                 os.path.join(self.bindir, 'smoke_test.html')))
     26             self.tab.WaitForDocumentReadyStateToBeComplete()
     27