OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/strings/utf_string_conversions.h" | 5 #include "base/strings/utf_string_conversions.h" |
6 #include "chrome/browser/ui/browser.h" | 6 #include "chrome/browser/ui/browser.h" |
7 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 7 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
8 #include "chrome/common/url_constants.h" | 8 #include "chrome/common/url_constants.h" |
9 #include "chrome/test/base/in_process_browser_test.h" | 9 #include "chrome/test/base/in_process_browser_test.h" |
10 #include "chrome/test/base/ui_test_utils.h" | 10 #include "chrome/test/base/ui_test_utils.h" |
11 #include "content/public/test/browser_test_utils.h" | 11 #include "content/public/test/browser_test_utils.h" |
12 #include "net/http/http_response_headers.h" | 12 #include "net/http/http_response_headers.h" |
13 #include "net/url_request/test_url_fetcher_factory.h" | 13 #include "net/url_request/test_url_fetcher_factory.h" |
14 #include "testing/gmock/include/gmock/gmock.h" | 14 #include "testing/gmock/include/gmock/gmock.h" |
15 | 15 |
16 using ::testing::Exactly; | 16 using ::testing::Exactly; |
17 using ::testing::Invoke; | 17 using ::testing::Invoke; |
18 using ::testing::_; | 18 using ::testing::_; |
19 | 19 |
20 namespace { | 20 namespace { |
21 | 21 |
22 const char kEULAURL[] = | 22 const char kEULAURL[] = |
23 "https://www.google.com/intl/en-US/chrome/eula_text.html"; | 23 "https://www.google.com/intl/en-US/chrome/eula_text.html"; |
24 const char kFakeOnlineEULA[] = "No obligations at all"; | 24 const char kFakeOnlineEULA[] = "No obligations at all"; |
| 25 #if defined(GOOGLE_CHROME_BUILD) |
25 const char kOfflineEULAWarning[] = "A copy of the Google Terms of Service"; | 26 const char kOfflineEULAWarning[] = "A copy of the Google Terms of Service"; |
| 27 #endif |
26 | 28 |
27 class TermsOfServiceProcessBrowserTest : public InProcessBrowserTest { | 29 class TermsOfServiceProcessBrowserTest : public InProcessBrowserTest { |
28 }; | 30 }; |
29 | 31 |
30 class TestURLFetcherCallback { | 32 class TestURLFetcherCallback { |
31 public: | 33 public: |
32 scoped_ptr<net::FakeURLFetcher> CreateURLFetcher( | 34 scoped_ptr<net::FakeURLFetcher> CreateURLFetcher( |
33 const GURL& url, | 35 const GURL& url, |
34 net::URLFetcherDelegate* d, | 36 net::URLFetcherDelegate* d, |
35 const std::string& response_data, | 37 const std::string& response_data, |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 std::string body; | 96 std::string body; |
95 ASSERT_TRUE(content::ExecuteScriptAndExtractString( | 97 ASSERT_TRUE(content::ExecuteScriptAndExtractString( |
96 web_contents, | 98 web_contents, |
97 "window.domAutomationController.send(document.body.textContent)", | 99 "window.domAutomationController.send(document.body.textContent)", |
98 &body)); | 100 &body)); |
99 EXPECT_NE(std::string(), body); | 101 EXPECT_NE(std::string(), body); |
100 #endif | 102 #endif |
101 } | 103 } |
102 | 104 |
103 } // namespace | 105 } // namespace |
OLD | NEW |