Changeset 133916 in webkit
- Timestamp:
- Nov 8, 2012 10:33:22 AM (12 years ago)
- Location:
- trunk/Source/WebKit/chromium
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/chromium/ChangeLog
r133910 r133916 1 2012-11-08 Dan Carney <dcarney@google.com> 2 3 Cleanup IDBBindingUtilitiesTest 4 https://bugs.webkit.org/show_bug.cgi?id=100860 5 6 Reviewed by Adam Barth. 7 8 Small cleanup of IDBBindingUtilitiesTest as per 9 https://bugs.webkit.org/show_bug.cgi?id=99975#c38 10 11 * tests/IDBBindingUtilitiesTest.cpp: 12 (IDBKeyFromValueAndKeyPathTest): 13 (WebKit::IDBKeyFromValueAndKeyPathTest::IDBKeyFromValueAndKeyPathTest): 14 (WebKit::IDBKeyFromValueAndKeyPathTest::context): 15 (WebKit): 16 (WebKit::TEST_F): 17 1 18 2012-11-08 Keishi Hattori <keishi@webkit.org> 2 19 -
trunk/Source/WebKit/chromium/tests/IDBBindingUtilitiesTest.cpp
r132922 r133916 100 100 } 101 101 102 static v8::Handle<v8::Context> context() 103 { 104 static WebView* webView; 105 if (!webView) { 106 webView = FrameTestHelpers::createWebViewAndLoad("about:blank"); 107 webView->setFocus(true); 108 } 109 ScriptExecutionContext* context = static_cast<WebFrameImpl*>(webView->mainFrame())->frame()->document(); 110 return toV8Context(context, WorldContextHandle(UseCurrentWorld)); 111 } 112 113 TEST(IDBKeyFromValueAndKeyPathTest, TopLevelPropertyStringValue) 102 class IDBKeyFromValueAndKeyPathTest : public testing::Test { 103 public: 104 IDBKeyFromValueAndKeyPathTest() 105 : m_webView(0) 106 { 107 } 108 109 void SetUp() OVERRIDE 110 { 111 m_webView = FrameTestHelpers::createWebViewAndLoad("about:blank"); 112 m_webView->setFocus(true); 113 } 114 115 void TearDown() OVERRIDE 116 { 117 m_webView->close(); 118 } 119 120 v8::Handle<v8::Context> context() 121 { 122 return static_cast<WebFrameImpl*>(m_webView->mainFrame())->frame()->script()->mainWorldContext(); 123 } 124 125 private: 126 WebView* m_webView; 127 }; 128 129 TEST_F(IDBKeyFromValueAndKeyPathTest, TopLevelPropertyStringValue) 114 130 { 115 131 v8::HandleScope handleScope; … … 125 141 } 126 142 127 TEST (IDBKeyFromValueAndKeyPathTest, TopLevelPropertyNumberValue)143 TEST_F(IDBKeyFromValueAndKeyPathTest, TopLevelPropertyNumberValue) 128 144 { 129 145 v8::HandleScope handleScope; … … 139 155 } 140 156 141 TEST (IDBKeyFromValueAndKeyPathTest, SubProperty)157 TEST_F(IDBKeyFromValueAndKeyPathTest, SubProperty) 142 158 { 143 159 v8::HandleScope handleScope; … … 155 171 } 156 172 157 TEST(InjectIDBKeyTest, TopLevelPropertyStringValue) 173 class InjectIDBKeyTest : public IDBKeyFromValueAndKeyPathTest { 174 }; 175 176 TEST_F(InjectIDBKeyTest, TopLevelPropertyStringValue) 158 177 { 159 178 v8::HandleScope handleScope; … … 170 189 } 171 190 172 TEST (InjectIDBKeyTest, SubProperty)191 TEST_F(InjectIDBKeyTest, SubProperty) 173 192 { 174 193 v8::HandleScope handleScope;
Note: See TracChangeset
for help on using the changeset viewer.