# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from marionette_harness import MarionetteTestCase class TestPageSource(MarionetteTestCase): def testShouldReturnTheSourceOfAPage(self): test_html = self.marionette.absolute_url("testPageSource.html") self.marionette.navigate(test_html) source = self.marionette.page_source from_web_api = self.marionette.execute_script("return document.documentElement.outerHTML") self.assertTrue("baz") self.assertEqual(source, from_web_api)