1# Copyright (c) 2012 The Chromium 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"""Tests that demonstrate use of install test framework."""
6
7import os
8import sys
9import unittest
10
11from install_test import InstallTest
12
13
14class SampleUpdater(InstallTest):
15  """Sample update tests."""
16
17  def testCanOpenGoogle(self):
18    """Simple Navigation.
19
20    This test case illustrates how to run an update test. Update tests require
21    two or more builds.
22    """
23    self.Install(self.GetUpdateBuilds()[0])
24    self.StartChrome()
25    self._driver.get('http://www.google.com/')
26    self.Install(self.GetUpdateBuilds()[1])
27    self.StartChrome()
28    self._driver.get('http://www.google.org/')
29
30  def testCanOpenGoogleOrg(self):
31    """Simple Navigation.
32
33    This test case illustrates how to run a fresh install test. Simple install
34    tests, unlike update test, require only a single build.
35    """
36    self.Install(self.GetInstallBuild())
37    self.StartChrome()
38    self._driver.get('http://www.google.org/')
39
40  def testCanOpenNewTab(self):
41    """Sample of using the extended webdriver interface."""
42    self.Install(self.GetInstallBuild())
43    self.StartChrome()
44    self._driver.create_blank_tab()
45