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

Unified Diff: Source/web/tests/WebDocumentTest.cpp

Issue 1174283002: Fix unit test style in Source/web/. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: remove static 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 | « Source/web/tests/ViewportTest.cpp ('k') | Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/tests/WebDocumentTest.cpp
diff --git a/Source/web/tests/WebDocumentTest.cpp b/Source/web/tests/WebDocumentTest.cpp
index 464d3cb954855cae0b5625d803d12c890fefe581..6d8008f451d3a4497b00314c7ac806b17a28a3e6 100644
--- a/Source/web/tests/WebDocumentTest.cpp
+++ b/Source/web/tests/WebDocumentTest.cpp
@@ -3,7 +3,6 @@
// found in the LICENSE file.
#include "config.h"
-
#include "public/web/WebDocument.h"
#include "core/CSSPropertyNames.h"
@@ -22,11 +21,10 @@
#include "web/tests/FrameTestHelpers.h"
#include <gtest/gtest.h>
-namespace {
+namespace blink {
using blink::FrameTestHelpers::WebViewHelper;
using blink::URLTestHelpers::toKURL;
-using namespace blink;
const char* kDefaultOrigin = "https://example.test/";
const char* kManifestDummyFilePath = "manifest-dummy.html";
@@ -138,36 +136,38 @@ TEST_F(WebDocumentTest, ManifestUseCredentials)
}
namespace {
- const char* baseURLOriginA = "http://example.test:0/";
- const char* baseURLOriginSubA = "http://subdomain.example.test:0/";
- const char* baseURLOriginB = "http://not-example.test:0/";
- const char* emptyFile = "first_party/empty.html";
- const char* nestedData = "first_party/nested-data.html";
- const char* nestedOriginA = "first_party/nested-originA.html";
- const char* nestedOriginSubA = "first_party/nested-originSubA.html";
- const char* nestedOriginAInOriginA = "first_party/nested-originA-in-originA.html";
- const char* nestedOriginAInOriginB = "first_party/nested-originA-in-originB.html";
- const char* nestedOriginB = "first_party/nested-originB.html";
- const char* nestedOriginBInOriginA = "first_party/nested-originB-in-originA.html";
- const char* nestedOriginBInOriginB = "first_party/nested-originB-in-originB.html";
- const char* nestedSrcDoc = "first_party/nested-srcdoc.html";
-
- static KURL toOriginA(const char* file)
- {
- return toKURL(std::string(baseURLOriginA) + file);
- }
-
- static KURL toOriginSubA(const char* file)
- {
- return toKURL(std::string(baseURLOriginSubA) + file);
- }
-
- static KURL toOriginB(const char* file)
- {
- return toKURL(std::string(baseURLOriginB) + file);
- }
+
+const char* baseURLOriginA = "http://example.test:0/";
+const char* baseURLOriginSubA = "http://subdomain.example.test:0/";
+const char* baseURLOriginB = "http://not-example.test:0/";
+const char* emptyFile = "first_party/empty.html";
+const char* nestedData = "first_party/nested-data.html";
+const char* nestedOriginA = "first_party/nested-originA.html";
+const char* nestedOriginSubA = "first_party/nested-originSubA.html";
+const char* nestedOriginAInOriginA = "first_party/nested-originA-in-originA.html";
+const char* nestedOriginAInOriginB = "first_party/nested-originA-in-originB.html";
+const char* nestedOriginB = "first_party/nested-originB.html";
+const char* nestedOriginBInOriginA = "first_party/nested-originB-in-originA.html";
+const char* nestedOriginBInOriginB = "first_party/nested-originB-in-originB.html";
+const char* nestedSrcDoc = "first_party/nested-srcdoc.html";
+
+KURL toOriginA(const char* file)
+{
+ return toKURL(std::string(baseURLOriginA) + file);
+}
+
+KURL toOriginSubA(const char* file)
+{
+ return toKURL(std::string(baseURLOriginSubA) + file);
+}
+
+KURL toOriginB(const char* file)
+{
+ return toKURL(std::string(baseURLOriginB) + file);
}
+} // anonymous namespace
+
class WebDocumentFirstPartyTest : public WebDocumentTest {
public:
static void SetUpTestCase();
@@ -296,4 +296,4 @@ TEST_F(WebDocumentFirstPartyTest, NestedData)
ASSERT_EQ(SecurityOrigin::urlWithUniqueSecurityOrigin(), nestedDocument()->firstPartyForCookies());
}
-}
+} // namespace blink
« no previous file with comments | « Source/web/tests/ViewportTest.cpp ('k') | Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698