OLD | NEW |
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 import os | 4 import os |
5 | 5 |
6 from telemetry import tab_test_case | 6 from telemetry import tab_test_case |
7 | 7 |
8 class InspectorPageTest(tab_test_case.TabTestCase): | 8 class InspectorPageTest(tab_test_case.TabTestCase): |
9 def __init__(self, *args): | 9 def __init__(self, *args): |
10 super(InspectorPageTest, self).__init__(*args) | 10 super(InspectorPageTest, self).__init__(*args) |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 | 48 |
49 def testGetCookieByName(self): | 49 def testGetCookieByName(self): |
50 unittest_data_dir = os.path.join(os.path.dirname(__file__), | 50 unittest_data_dir = os.path.join(os.path.dirname(__file__), |
51 '..', 'unittest_data') | 51 '..', 'unittest_data') |
52 self._browser.SetHTTPServerDirectory(unittest_data_dir) | 52 self._browser.SetHTTPServerDirectory(unittest_data_dir) |
53 self._tab.Navigate( | 53 self._tab.Navigate( |
54 self._browser.http_server.UrlOf('blank.html')) | 54 self._browser.http_server.UrlOf('blank.html')) |
55 self._tab.WaitForDocumentReadyStateToBeComplete() | 55 self._tab.WaitForDocumentReadyStateToBeComplete() |
56 self._tab.ExecuteJavaScript('document.cookie="foo=bar"') | 56 self._tab.ExecuteJavaScript('document.cookie="foo=bar"') |
57 self.assertEquals(self._tab.GetCookieByName('foo'), 'bar') | 57 self.assertEquals(self._tab.GetCookieByName('foo'), 'bar') |
OLD | NEW |