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

Unified Diff: content/common/cross_site_document_classifier_unittest.cc

Issue 1174323002: [Patch 5 of 6] Split out the site_isolation_policy files (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@rename_policy_to_sniffer3
Patch Set: Re-upload. Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/common/cross_site_document_classifier.cc ('k') | content/content_child.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/cross_site_document_classifier_unittest.cc
diff --git a/content/child/site_isolation_policy_unittest.cc b/content/common/cross_site_document_classifier_unittest.cc
similarity index 86%
rename from content/child/site_isolation_policy_unittest.cc
rename to content/common/cross_site_document_classifier_unittest.cc
index 8f01bc5eb44eda9f89a0fa101619aba0ec65ba4d..53f10588946ee00686ec45920be4d4db245e9ed5 100644
--- a/content/child/site_isolation_policy_unittest.cc
+++ b/content/common/cross_site_document_classifier_unittest.cc
@@ -1,14 +1,10 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
+// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/strings/string_piece.h"
-#include "base/strings/utf_string_conversions.h"
-#include "content/child/site_isolation_policy.h"
-#include "content/public/common/context_menu_params.h"
+#include "content/common/cross_site_document_classifier.h"
#include "testing/gtest/include/gtest/gtest.h"
-#include "third_party/WebKit/public/platform/WebURLResponse.h"
-#include "ui/gfx/range/range.h"
using base::StringPiece;
@@ -120,17 +116,4 @@ TEST(CrossSiteDocumentClassifierTest, SniffForJSON) {
EXPECT_FALSE(CrossSiteDocumentClassifier::SniffForJSON(empty_data));
}
-TEST(SiteIsolationStatsGathererTest, SniffForJS) {
- StringPiece basic_js_data("var a = 4");
- StringPiece js_data("\t\t\r\n var a = 4");
- StringPiece json_data("\t\t\r\n { \"name\" : \"chrome\", ");
- StringPiece empty_data("");
-
- EXPECT_TRUE(SiteIsolationStatsGatherer::SniffForJS(js_data));
- EXPECT_FALSE(SiteIsolationStatsGatherer::SniffForJS(json_data));
-
- // Basic bounds check.
- EXPECT_FALSE(SiteIsolationStatsGatherer::SniffForJS(empty_data));
-}
-
} // namespace content
« no previous file with comments | « content/common/cross_site_document_classifier.cc ('k') | content/content_child.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698