| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 | 4 |
| 5 #include "chrome/browser/extensions/extension_apitest.h" | 5 #include "chrome/browser/extensions/extension_apitest.h" |
| 6 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 6 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 7 #include "components/version_info/version_info.h" |
| 7 #include "content/public/test/browser_test_utils.h" | 8 #include "content/public/test/browser_test_utils.h" |
| 8 #include "extensions/test/extension_test_message_listener.h" | 9 #include "extensions/test/extension_test_message_listener.h" |
| 9 | 10 |
| 10 namespace extensions { | 11 namespace extensions { |
| 11 | 12 |
| 12 class ServiceWorkerTest : public ExtensionApiTest { | 13 class ServiceWorkerTest : public ExtensionApiTest { |
| 13 public: | 14 public: |
| 14 // Set the channel to "trunk" since service workers are restricted to trunk. | 15 // Set the channel to "trunk" since service workers are restricted to trunk. |
| 15 ServiceWorkerTest() | 16 ServiceWorkerTest() |
| 16 : current_channel_(version_info::Channel::UNKNOWN) {} | 17 : current_channel_(version_info::Channel::UNKNOWN) {} |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 contents->GetController().Reload(true); | 59 contents->GetController().Reload(true); |
| 59 content::WaitForLoadStop(contents); | 60 content::WaitForLoadStop(contents); |
| 60 | 61 |
| 61 ASSERT_TRUE(content::ExecuteScriptAndExtractString( | 62 ASSERT_TRUE(content::ExecuteScriptAndExtractString( |
| 62 contents, "window.domAutomationController.send(document.body.innerText);", | 63 contents, "window.domAutomationController.send(document.body.innerText);", |
| 63 &output)); | 64 &output)); |
| 64 EXPECT_EQ("Caught a fetch!", output); | 65 EXPECT_EQ("Caught a fetch!", output); |
| 65 } | 66 } |
| 66 | 67 |
| 67 } // namespace extensions | 68 } // namespace extensions |
| OLD | NEW |