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 | 4 |
5 #include "base/bind.h" | 5 #include "base/bind.h" |
6 #include "base/strings/string_number_conversions.h" | 6 #include "base/strings/string_number_conversions.h" |
7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
8 #include "chrome/app/chrome_command_ids.h" | 8 #include "chrome/app/chrome_command_ids.h" |
9 #include "chrome/browser/tab_contents/render_view_context_menu.h" | 9 #include "chrome/browser/tab_contents/render_view_context_menu.h" |
10 #include "chrome/browser/tab_contents/render_view_context_menu_browsertest_util.
h" | 10 #include "chrome/browser/tab_contents/render_view_context_menu_browsertest_util.
h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 FILE_PATH_LITERAL("chrome/test/data/referrer_policy"); | 40 FILE_PATH_LITERAL("chrome/test/data/referrer_policy"); |
41 | 41 |
42 } // namespace | 42 } // namespace |
43 | 43 |
44 class ReferrerPolicyTest : public InProcessBrowserTest { | 44 class ReferrerPolicyTest : public InProcessBrowserTest { |
45 public: | 45 public: |
46 ReferrerPolicyTest() {} | 46 ReferrerPolicyTest() {} |
47 virtual ~ReferrerPolicyTest() {} | 47 virtual ~ReferrerPolicyTest() {} |
48 | 48 |
49 virtual void SetUp() OVERRIDE { | 49 virtual void SetUp() OVERRIDE { |
50 test_server_.reset(new net::TestServer(net::TestServer::TYPE_HTTP, | 50 test_server_.reset(new net::TestServer( |
51 net::TestServer::kLocalhost, | 51 net::TestServer::TYPE_HTTP, |
52 base::FilePath(kDocRoot))); | 52 net::TestServer::kLocalhost, |
| 53 net::TestServer::GetSourceRelativePath(base::FilePath(kDocRoot)))); |
53 ASSERT_TRUE(test_server_->Start()); | 54 ASSERT_TRUE(test_server_->Start()); |
54 ssl_test_server_.reset(new net::TestServer(net::TestServer::TYPE_HTTPS, | 55 ssl_test_server_.reset(new net::TestServer( |
55 net::TestServer::kLocalhost, | 56 net::TestServer::TYPE_HTTPS, |
56 base::FilePath(kDocRoot))); | 57 net::TestServer::kLocalhost, |
| 58 net::TestServer::GetSourceRelativePath(base::FilePath(kDocRoot)))); |
57 ASSERT_TRUE(ssl_test_server_->Start()); | 59 ASSERT_TRUE(ssl_test_server_->Start()); |
58 | 60 |
59 InProcessBrowserTest::SetUp(); | 61 InProcessBrowserTest::SetUp(); |
60 } | 62 } |
61 | 63 |
62 protected: | 64 protected: |
63 enum ExpectedReferrer { | 65 enum ExpectedReferrer { |
64 EXPECT_EMPTY_REFERRER, | 66 EXPECT_EMPTY_REFERRER, |
65 EXPECT_FULL_REFERRER, | 67 EXPECT_FULL_REFERRER, |
66 EXPECT_ORIGIN_AS_REFERRER | 68 EXPECT_ORIGIN_AS_REFERRER |
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
399 chrome::Reload(browser(), CURRENT_TAB); | 401 chrome::Reload(browser(), CURRENT_TAB); |
400 EXPECT_EQ(expected_title, title_watcher->WaitAndGetTitle()); | 402 EXPECT_EQ(expected_title, title_watcher->WaitAndGetTitle()); |
401 | 403 |
402 title_watcher.reset(new content::TitleWatcher(tab, expected_title)); | 404 title_watcher.reset(new content::TitleWatcher(tab, expected_title)); |
403 AddAllPossibleTitles(start_url, title_watcher.get()); | 405 AddAllPossibleTitles(start_url, title_watcher.get()); |
404 | 406 |
405 // Shift-reload to B. | 407 // Shift-reload to B. |
406 chrome::ReloadIgnoringCache(browser(), CURRENT_TAB); | 408 chrome::ReloadIgnoringCache(browser(), CURRENT_TAB); |
407 EXPECT_EQ(expected_title, title_watcher->WaitAndGetTitle()); | 409 EXPECT_EQ(expected_title, title_watcher->WaitAndGetTitle()); |
408 } | 410 } |
OLD | NEW |