OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 bool ShouldSkipResource(const WebURL&) final { return false; } | 63 bool ShouldSkipResource(const WebURL&) final { return false; } |
64 | 64 |
65 WebString GetContentID(WebFrame*) final { return WebString("<cid>"); } | 65 WebString GetContentID(WebFrame*) final { return WebString("<cid>"); } |
66 | 66 |
67 WebFrameSerializerCacheControlPolicy CacheControlPolicy() final { | 67 WebFrameSerializerCacheControlPolicy CacheControlPolicy() final { |
68 return WebFrameSerializerCacheControlPolicy::kNone; | 68 return WebFrameSerializerCacheControlPolicy::kNone; |
69 } | 69 } |
70 | 70 |
71 bool UseBinaryEncoding() final { return false; } | 71 bool UseBinaryEncoding() final { return false; } |
72 bool RemovePopupOverlay() final { return remove_popup_overlay_; } | 72 bool RemovePopupOverlay() final { return remove_popup_overlay_; } |
| 73 bool UsePageProblemDetectors() final { return false; } |
73 | 74 |
74 bool remove_popup_overlay_; | 75 bool remove_popup_overlay_; |
75 }; | 76 }; |
76 | 77 |
77 // Returns the count of match for substring |pattern| in string |str|. | 78 // Returns the count of match for substring |pattern| in string |str|. |
78 int MatchSubstring(const String& str, const char* pattern, size_t size) { | 79 int MatchSubstring(const String& str, const char* pattern, size_t size) { |
79 int matches = 0; | 80 int matches = 0; |
80 size_t start = 0; | 81 size_t start = 0; |
81 while (true) { | 82 while (true) { |
82 size_t pos = str.Find(pattern, start); | 83 size_t pos = str.Find(pattern, start); |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
340 mhtml.Find("<meta http-equiv=3D\"Content-Security-Policy")); | 341 mhtml.Find("<meta http-equiv=3D\"Content-Security-Policy")); |
341 EXPECT_NE(WTF::kNotFound, mhtml.Find("<meta name=3D\"description")); | 342 EXPECT_NE(WTF::kNotFound, mhtml.Find("<meta name=3D\"description")); |
342 EXPECT_NE(WTF::kNotFound, mhtml.Find("<meta http-equiv=3D\"refresh")); | 343 EXPECT_NE(WTF::kNotFound, mhtml.Find("<meta http-equiv=3D\"refresh")); |
343 | 344 |
344 // If an element is removed, its children should also be skipped. | 345 // If an element is removed, its children should also be skipped. |
345 EXPECT_EQ(WTF::kNotFound, mhtml.Find("<select")); | 346 EXPECT_EQ(WTF::kNotFound, mhtml.Find("<select")); |
346 EXPECT_EQ(WTF::kNotFound, mhtml.Find("<option")); | 347 EXPECT_EQ(WTF::kNotFound, mhtml.Find("<option")); |
347 } | 348 } |
348 | 349 |
349 } // namespace blink | 350 } // namespace blink |
OLD | NEW |