Bug 1434872 - [marionette] Fix remote_page checks in bf_cache navigtion tests. r=ato, a=test-only
authorHenrik Skupin <mail@hskupin.info>
Sat, 05 May 2018 17:04:58 +0200
changeset 473689 d60907dc30693a09471d9c3f1ad8f721f9c00f17
parent 473688 3054da2c5d2ab8c08ca4cd6a4752f1590d22fb80
child 473690 717a9229c6f40a2f72f736af6a9b5d8e4756cdb7
push id1728
push userjlund@mozilla.com
push dateMon, 18 Jun 2018 21:12:27 +0000
treeherdermozilla-release@c296fde26f5f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersato, test-only
bugs1434872
milestone61.0
Bug 1434872 - [marionette] Fix remote_page checks in bf_cache navigtion tests. r=ato, a=test-only Currently the remote check only gets performed for the very last page of each bfcache test. Instead it has to be executed for each individual web page as loaded. MozReview-Commit-ID: IIqnLy4RhZ5
testing/marionette/harness/marionette_harness/tests/unit/test_navigation.py
--- a/testing/marionette/harness/marionette_harness/tests/unit/test_navigation.py
+++ b/testing/marionette/harness/marionette_harness/tests/unit/test_navigation.py
@@ -379,34 +379,34 @@ class TestBackForwardNavigation(BaseNavi
         for page in test_pages[-2::-1]:
             if "error" in page:
                 with self.assertRaises(page["error"]):
                     self.marionette.go_back()
             else:
                 self.marionette.go_back()
             self.assertEqual(page["url"], self.marionette.get_url())
 
-        if "is_remote" in page:
-            self.assertEqual(page["is_remote"], self.is_remote_tab,
-                             "'{}' doesn't match expected remoteness state: {}".format(
-                                 page["url"], page["is_remote"]))
+            if "is_remote" in page:
+                self.assertEqual(page["is_remote"], self.is_remote_tab,
+                                 "'{}' doesn't match expected remoteness state: {}".format(
+                                     page["url"], page["is_remote"]))
 
         # Now going forward in history by skipping the first entry.
         for page in test_pages[1::]:
             if "error" in page:
                 with self.assertRaises(page["error"]):
                     self.marionette.go_forward()
             else:
                 self.marionette.go_forward()
             self.assertEqual(page["url"], self.marionette.get_url())
 
-        if "is_remote" in page:
-            self.assertEqual(page["is_remote"], self.is_remote_tab,
-                             "'{}' doesn't match expected remoteness state: {}".format(
-                                 page["url"], page["is_remote"]))
+            if "is_remote" in page:
+                self.assertEqual(page["is_remote"], self.is_remote_tab,
+                                 "'{}' doesn't match expected remoteness state: {}".format(
+                                     page["url"], page["is_remote"]))
 
     def test_no_history_items(self):
         # Both methods should not raise a failure if no navigation is possible
         self.marionette.go_back()
         self.marionette.go_forward()
 
     def test_data_urls(self):
         test_pages = [