Commit c30d7805 authored by Bruce Dawson's avatar Bruce Dawson Committed by Commit Bot

Rename DictionaryTest to fix jumbo builds

blink::anonymous::DictionaryTest becomes ambiguous with
blink::DictionaryTest in jumbo builds. This renames DictionaryTest to
avoid the ambiguity.

Build errors look like:
third_party/WebKit/Source\core/testing/Internals.h(408): error C2872: 'DictionaryTest': ambiguous symbol
third_party/WebKit/Source\core/testing/Internals.h(53): note: could be 'blink::DictionaryTest'
third_party/WebKit/Source/bindings/core/v8/DictionaryTest.cpp(18): note: or       'blink::`anonymous-namespace'::DictionaryTest'

Bug: 713137
Change-Id: Id13065afdb406808a6fa3a53b958ae976629d850
Reviewed-on: https://chromium-review.googlesource.com/724000Reviewed-by: default avatarJeremy Roman <jbroman@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#509537}
parent 22a9493a
...@@ -15,7 +15,7 @@ namespace blink { ...@@ -15,7 +15,7 @@ namespace blink {
namespace { namespace {
class DictionaryTest : public ::testing::Test { class V8DictionaryTest : public ::testing::Test {
protected: protected:
static Dictionary CreateDictionary(ScriptState* script_state, const char* s) { static Dictionary CreateDictionary(ScriptState* script_state, const char* s) {
v8::Local<v8::String> source = v8::Local<v8::String> source =
...@@ -35,7 +35,7 @@ class DictionaryTest : public ::testing::Test { ...@@ -35,7 +35,7 @@ class DictionaryTest : public ::testing::Test {
} }
}; };
TEST_F(DictionaryTest, Get_Empty) { TEST_F(V8DictionaryTest, Get_Empty) {
V8TestingScope scope; V8TestingScope scope;
Dictionary dictionary = CreateDictionary(scope.GetScriptState(), "({})"); Dictionary dictionary = CreateDictionary(scope.GetScriptState(), "({})");
...@@ -45,7 +45,7 @@ TEST_F(DictionaryTest, Get_Empty) { ...@@ -45,7 +45,7 @@ TEST_F(DictionaryTest, Get_Empty) {
EXPECT_FALSE(r.has_value()); EXPECT_FALSE(r.has_value());
} }
TEST_F(DictionaryTest, Get_NonPresentForNonEmpty) { TEST_F(V8DictionaryTest, Get_NonPresentForNonEmpty) {
V8TestingScope scope; V8TestingScope scope;
Dictionary dictionary = Dictionary dictionary =
CreateDictionary(scope.GetScriptState(), "({foo: 3})"); CreateDictionary(scope.GetScriptState(), "({foo: 3})");
...@@ -56,7 +56,7 @@ TEST_F(DictionaryTest, Get_NonPresentForNonEmpty) { ...@@ -56,7 +56,7 @@ TEST_F(DictionaryTest, Get_NonPresentForNonEmpty) {
EXPECT_FALSE(r.has_value()); EXPECT_FALSE(r.has_value());
} }
TEST_F(DictionaryTest, Get_UndefinedValue) { TEST_F(V8DictionaryTest, Get_UndefinedValue) {
V8TestingScope scope; V8TestingScope scope;
Dictionary dictionary = Dictionary dictionary =
CreateDictionary(scope.GetScriptState(), "({foo: undefined})"); CreateDictionary(scope.GetScriptState(), "({foo: undefined})");
...@@ -67,7 +67,7 @@ TEST_F(DictionaryTest, Get_UndefinedValue) { ...@@ -67,7 +67,7 @@ TEST_F(DictionaryTest, Get_UndefinedValue) {
EXPECT_FALSE(r.has_value()); EXPECT_FALSE(r.has_value());
} }
TEST_F(DictionaryTest, Get_Found) { TEST_F(V8DictionaryTest, Get_Found) {
V8TestingScope scope; V8TestingScope scope;
Dictionary dictionary = Dictionary dictionary =
CreateDictionary(scope.GetScriptState(), "({foo: 3})"); CreateDictionary(scope.GetScriptState(), "({foo: 3})");
...@@ -79,7 +79,7 @@ TEST_F(DictionaryTest, Get_Found) { ...@@ -79,7 +79,7 @@ TEST_F(DictionaryTest, Get_Found) {
EXPECT_EQ(*r, "3"); EXPECT_EQ(*r, "3");
} }
TEST_F(DictionaryTest, Get_Found2) { TEST_F(V8DictionaryTest, Get_Found2) {
V8TestingScope scope; V8TestingScope scope;
Dictionary dictionary = Dictionary dictionary =
CreateDictionary(scope.GetScriptState(), "({foo: '3'})"); CreateDictionary(scope.GetScriptState(), "({foo: '3'})");
...@@ -91,7 +91,7 @@ TEST_F(DictionaryTest, Get_Found2) { ...@@ -91,7 +91,7 @@ TEST_F(DictionaryTest, Get_Found2) {
EXPECT_EQ(*r, 3); EXPECT_EQ(*r, 3);
} }
TEST_F(DictionaryTest, Get_Getter) { TEST_F(V8DictionaryTest, Get_Getter) {
V8TestingScope scope; V8TestingScope scope;
Dictionary dictionary = CreateDictionary(scope.GetScriptState(), Dictionary dictionary = CreateDictionary(scope.GetScriptState(),
"({get foo() { return 'xy'; }})"); "({get foo() { return 'xy'; }})");
...@@ -103,7 +103,7 @@ TEST_F(DictionaryTest, Get_Getter) { ...@@ -103,7 +103,7 @@ TEST_F(DictionaryTest, Get_Getter) {
EXPECT_EQ(*r, "xy"); EXPECT_EQ(*r, "xy");
} }
TEST_F(DictionaryTest, Get_ExceptionOnAccess) { TEST_F(V8DictionaryTest, Get_ExceptionOnAccess) {
V8TestingScope scope; V8TestingScope scope;
Dictionary dictionary = CreateDictionary(scope.GetScriptState(), Dictionary dictionary = CreateDictionary(scope.GetScriptState(),
"({get foo() { throw Error(2); }})"); "({get foo() { throw Error(2); }})");
...@@ -114,7 +114,7 @@ TEST_F(DictionaryTest, Get_ExceptionOnAccess) { ...@@ -114,7 +114,7 @@ TEST_F(DictionaryTest, Get_ExceptionOnAccess) {
ASSERT_FALSE(r.has_value()); ASSERT_FALSE(r.has_value());
} }
TEST_F(DictionaryTest, Get_TypeConversion) { TEST_F(V8DictionaryTest, Get_TypeConversion) {
V8TestingScope scope; V8TestingScope scope;
Dictionary dictionary = CreateDictionary( Dictionary dictionary = CreateDictionary(
scope.GetScriptState(), "({foo: { toString() { return 'hello'; } } })"); scope.GetScriptState(), "({foo: { toString() { return 'hello'; } } })");
...@@ -126,7 +126,7 @@ TEST_F(DictionaryTest, Get_TypeConversion) { ...@@ -126,7 +126,7 @@ TEST_F(DictionaryTest, Get_TypeConversion) {
EXPECT_EQ(*r, "hello"); EXPECT_EQ(*r, "hello");
} }
TEST_F(DictionaryTest, Get_ConversionError) { TEST_F(V8DictionaryTest, Get_ConversionError) {
V8TestingScope scope; V8TestingScope scope;
Dictionary dictionary = CreateDictionary( Dictionary dictionary = CreateDictionary(
scope.GetScriptState(), scope.GetScriptState(),
...@@ -138,7 +138,7 @@ TEST_F(DictionaryTest, Get_ConversionError) { ...@@ -138,7 +138,7 @@ TEST_F(DictionaryTest, Get_ConversionError) {
ASSERT_FALSE(r.has_value()); ASSERT_FALSE(r.has_value());
} }
TEST_F(DictionaryTest, Get_ConversionError2) { TEST_F(V8DictionaryTest, Get_ConversionError2) {
V8TestingScope scope; V8TestingScope scope;
Dictionary dictionary = Dictionary dictionary =
CreateDictionary(scope.GetScriptState(), "({foo: NaN})"); CreateDictionary(scope.GetScriptState(), "({foo: NaN})");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment