| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "base/base_paths.h" | 5 #include "base/base_paths.h" |
| 6 #include "base/files/file_util.h" | 6 #include "base/files/file_util.h" |
| 7 #include "base/path_service.h" | 7 #include "base/path_service.h" |
| 8 #include "chrome/browser/extensions/component_loader.h" | 8 #include "chrome/browser/extensions/component_loader.h" |
| 9 #include "chrome/browser/extensions/extension_apitest.h" | 9 #include "chrome/browser/extensions/extension_apitest.h" |
| 10 #include "chrome/browser/extensions/extension_service.h" | 10 #include "chrome/browser/extensions/extension_service.h" |
| 11 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 11 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 12 #include "chrome/common/chrome_switches.h" | 12 #include "chrome/common/chrome_switches.h" |
| 13 #include "chrome/common/extensions/manifest_handlers/mime_types_handler.h" | 13 #include "chrome/common/extensions/manifest_handlers/mime_types_handler.h" |
| 14 #include "chrome/test/base/ui_test_utils.h" | 14 #include "chrome/test/base/ui_test_utils.h" |
| 15 #include "content/public/test/browser_test_utils.h" | 15 #include "content/public/test/browser_test_utils.h" |
| 16 #include "extensions/browser/extension_registry.h" | 16 #include "extensions/browser/extension_registry.h" |
| 17 #include "extensions/test/result_catcher.h" | 17 #include "extensions/test/result_catcher.h" |
| 18 #include "grit/browser_resources.h" | 18 #include "grit/browser_resources.h" |
| 19 #include "net/test/embedded_test_server/embedded_test_server.h" | 19 #include "net/test/embedded_test_server/embedded_test_server.h" |
| 20 | 20 |
| 21 class PDFExtensionTest : public ExtensionApiTest { | 21 class PDFExtensionTest : public ExtensionApiTest { |
| 22 public: | 22 public: |
| 23 virtual ~PDFExtensionTest() {} | 23 virtual ~PDFExtensionTest() {} |
| 24 | 24 |
| 25 virtual void SetUpCommandLine(CommandLine* command_line) override { | 25 virtual void SetUpCommandLine(base::CommandLine* command_line) override { |
| 26 ExtensionApiTest::SetUpCommandLine(command_line); | 26 ExtensionApiTest::SetUpCommandLine(command_line); |
| 27 command_line->AppendSwitch(switches::kEnableOutOfProcessPdf); | 27 command_line->AppendSwitch(switches::kEnableOutOfProcessPdf); |
| 28 } | 28 } |
| 29 | 29 |
| 30 virtual void SetUpOnMainThread() override { | 30 virtual void SetUpOnMainThread() override { |
| 31 ExtensionApiTest::SetUpOnMainThread(); | 31 ExtensionApiTest::SetUpOnMainThread(); |
| 32 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); | 32 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); |
| 33 } | 33 } |
| 34 | 34 |
| 35 | 35 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 RunTestsInFile("basic_test.js", false); | 89 RunTestsInFile("basic_test.js", false); |
| 90 } | 90 } |
| 91 | 91 |
| 92 IN_PROC_BROWSER_TEST_F(PDFExtensionTest, BasicPlugin) { | 92 IN_PROC_BROWSER_TEST_F(PDFExtensionTest, BasicPlugin) { |
| 93 RunTestsInFile("basic_plugin_test.js", true); | 93 RunTestsInFile("basic_plugin_test.js", true); |
| 94 } | 94 } |
| 95 | 95 |
| 96 IN_PROC_BROWSER_TEST_F(PDFExtensionTest, Viewport) { | 96 IN_PROC_BROWSER_TEST_F(PDFExtensionTest, Viewport) { |
| 97 RunTestsInFile("viewport_test.js", false); | 97 RunTestsInFile("viewport_test.js", false); |
| 98 } | 98 } |
| OLD | NEW |