Exemple #1
0
 def testNavigateAction(self):
     page = self.CreatePageFromUnittestDataDir('blank.html')
     i = navigate.NavigateAction()
     i.RunAction(page, self._tab)
     self.assertEquals(
         self._tab.EvaluateJavaScript('document.location.pathname;'),
         '/blank.html')
Exemple #2
0
  def testNavigateAction(self):
    self._browser.SetHTTPServerDirectories(util.GetUnittestDataDir())

    page = self.CreatePageFromUnittestDataDir('blank.html')
    i = navigate.NavigateAction()
    i.RunAction(page, self._tab, None)
    self.assertEquals(
        self._tab.EvaluateJavaScript('document.location.pathname;'),
        '/blank.html')
Exemple #3
0
  def ImplicitPageNavigation(self, test=None):
    """Executes the implicit navigation that occurs for every page iteration.

    This function will be called once per page before any actions are executed.
    """
    if test:
      test.WillNavigateToPage(self.page, self.tab)
      test.RunNavigateSteps(self.page, self.tab)
      test.DidNavigateToPage(self.page, self.tab)
    else:
      i = navigate.NavigateAction()
      i.RunAction(self.page, self.tab, None)
Exemple #4
0
 def testNavigateAction(self):
     i = navigate.NavigateAction(url=self.UrlOfUnittestFile('blank.html'))
     i.RunAction(self._tab)
     self.assertEquals(
         self._tab.EvaluateJavaScript('document.location.pathname;'),
         '/blank.html')