Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(162)

Side by Side Diff: chrome/browser/extensions/api/page_capture/page_capture_apitest.cc

Issue 2860553002: Clean up most of the ChromeOS headers in non-ChromeOS build (Closed)
Patch Set: rebase Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 4
5 #include "base/base_switches.h" 5 #include "base/base_switches.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/threading/thread_restrictions.h" 7 #include "base/threading/thread_restrictions.h"
8 #include "chrome/browser/extensions/api/page_capture/page_capture_api.h" 8 #include "chrome/browser/extensions/api/page_capture/page_capture_api.h"
9 #include "chrome/browser/extensions/extension_apitest.h" 9 #include "chrome/browser/extensions/extension_apitest.h"
10 #include "chrome/common/chrome_switches.h" 10 #include "chrome/common/chrome_switches.h"
11 #include "chromeos/login/login_state.h"
12 #include "content/public/common/content_switches.h" 11 #include "content/public/common/content_switches.h"
13 #include "content/public/test/test_utils.h" 12 #include "content/public/test/test_utils.h"
14 #include "extensions/browser/extension_dialog_auto_confirm.h" 13 #include "extensions/browser/extension_dialog_auto_confirm.h"
15 #include "net/dns/mock_host_resolver.h" 14 #include "net/dns/mock_host_resolver.h"
16 15
16 #if defined(OS_CHROMEOS)
17 #include "chromeos/login/login_state.h"
18 #endif // defined(OS_CHROMEOS)
19
17 using extensions::PageCaptureSaveAsMHTMLFunction; 20 using extensions::PageCaptureSaveAsMHTMLFunction;
18 using extensions::ScopedTestDialogAutoConfirm; 21 using extensions::ScopedTestDialogAutoConfirm;
19 22
20 class ExtensionPageCaptureApiTest : public ExtensionApiTest { 23 class ExtensionPageCaptureApiTest : public ExtensionApiTest {
21 public: 24 public:
22 void SetUpCommandLine(base::CommandLine* command_line) override { 25 void SetUpCommandLine(base::CommandLine* command_line) override {
23 ExtensionApiTest::SetUpCommandLine(command_line); 26 ExtensionApiTest::SetUpCommandLine(command_line);
24 command_line->AppendSwitchASCII(switches::kJavaScriptFlags, "--expose-gc"); 27 command_line->AppendSwitchASCII(switches::kJavaScriptFlags, "--expose-gc");
25 } 28 }
26 void SetUpOnMainThread() override { 29 void SetUpOnMainThread() override {
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 // Set Public Session state. 90 // Set Public Session state.
88 chromeos::LoginState::Get()->SetLoggedInState( 91 chromeos::LoginState::Get()->SetLoggedInState(
89 chromeos::LoginState::LOGGED_IN_ACTIVE, 92 chromeos::LoginState::LOGGED_IN_ACTIVE,
90 chromeos::LoginState::LOGGED_IN_USER_PUBLIC_ACCOUNT); 93 chromeos::LoginState::LOGGED_IN_USER_PUBLIC_ACCOUNT);
91 // Resolve Permission dialog with Deny. 94 // Resolve Permission dialog with Deny.
92 ScopedTestDialogAutoConfirm auto_confirm(ScopedTestDialogAutoConfirm::CANCEL); 95 ScopedTestDialogAutoConfirm auto_confirm(ScopedTestDialogAutoConfirm::CANCEL);
93 ASSERT_TRUE(RunExtensionTestWithArg("page_capture", "REQUEST_DENIED")) 96 ASSERT_TRUE(RunExtensionTestWithArg("page_capture", "REQUEST_DENIED"))
94 << message_; 97 << message_;
95 } 98 }
96 #endif // defined(OS_CHROMEOS) 99 #endif // defined(OS_CHROMEOS)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698