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 <windows.h> | 5 #include <windows.h> |
6 #include <atlsecurity.h> | 6 #include <atlsecurity.h> |
7 #include <shellapi.h> | 7 #include <shellapi.h> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/file_util.h" | 12 #include "base/file_util.h" |
13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
14 #include "base/memory/scoped_handle.h" | 14 #include "base/memory/scoped_handle.h" |
15 #include "base/message_loop.h" | 15 #include "base/message_loop.h" |
16 #include "base/path_service.h" | 16 #include "base/path_service.h" |
17 #include "base/process_util.h" | 17 #include "base/process_util.h" |
18 #include "base/utf_string_conversions.h" | 18 #include "base/utf_string_conversions.h" |
19 #include "net/base/net_util.h" | 19 #include "net/base/net_util.h" |
20 | 20 |
21 #include "chrome/browser/automation/url_request_automation_job.h" | 21 #include "chrome/browser/automation/url_request_automation_job.h" |
22 #include "chrome/common/chrome_version_info.h" | 22 #include "chrome/common/chrome_version_info.h" |
23 #include "chrome_frame/chrome_frame_automation.h" | 23 #include "chrome_frame/chrome_frame_automation.h" |
24 #include "chrome_frame/chrome_frame_delegate.h" | 24 #include "chrome_frame/chrome_frame_delegate.h" |
25 #include "chrome_frame/html_utils.h" | 25 #include "chrome_frame/html_utils.h" |
26 #include "testing/gtest/include/gtest/gtest.h" | 26 #include "testing/gtest/include/gtest/gtest.h" |
27 #include "webkit/glue/user_agent.h" | 27 #include "webkit/user_agent/user_agent_util.h" |
28 | 28 |
29 const char kChromeFrameUserAgent[] = "chromeframe"; | 29 const char kChromeFrameUserAgent[] = "chromeframe"; |
30 | 30 |
31 class HtmlUtilUnittest : public testing::Test { | 31 class HtmlUtilUnittest : public testing::Test { |
32 protected: | 32 protected: |
33 // Constructor | 33 // Constructor |
34 HtmlUtilUnittest() {} | 34 HtmlUtilUnittest() {} |
35 | 35 |
36 // Returns the test path given a test case. | 36 // Returns the test path given a test case. |
37 virtual bool GetTestPath(const std::string& test_case, FilePath* path) { | 37 virtual bool GetTestPath(const std::string& test_case, FilePath* path) { |
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
495 "Content-Length: 42\r\n" | 495 "Content-Length: 42\r\n" |
496 "X-Frame-Options: SAMEORIGIN\r\n")); | 496 "X-Frame-Options: SAMEORIGIN\r\n")); |
497 EXPECT_TRUE(http_utils::HasFrameBustingHeader( | 497 EXPECT_TRUE(http_utils::HasFrameBustingHeader( |
498 "X-Frame-Options: deny\r\n" | 498 "X-Frame-Options: deny\r\n" |
499 "X-Frame-Options: ALLOWall\r\n" | 499 "X-Frame-Options: ALLOWall\r\n" |
500 "Content-Length: 42\r\n")); | 500 "Content-Length: 42\r\n")); |
501 EXPECT_TRUE(http_utils::HasFrameBustingHeader( | 501 EXPECT_TRUE(http_utils::HasFrameBustingHeader( |
502 "X-Frame-Options: SAMEORIGIN\r\n" | 502 "X-Frame-Options: SAMEORIGIN\r\n" |
503 "X-Frame-Options: ALLOWall\r\n")); | 503 "X-Frame-Options: ALLOWall\r\n")); |
504 } | 504 } |
OLD | NEW |