WebKit1.SetAndUpdateCacheModelPreferencesChangeMix fails on some machines
authorap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 6 Apr 2015 19:58:05 +0000 (19:58 +0000)
committerap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 6 Apr 2015 19:58:05 +0000 (19:58 +0000)
https://bugs.webkit.org/show_bug.cgi?id=143450

Reviewed by Anders Carlsson.

* TestWebKitAPI/Tests/mac/SetAndUpdateCacheModel.mm: (TestWebKitAPI::TEST):
Make sure that the view is actually closed, regardless of anything else that happens beneath.
Also, removed unnecessary get() calls.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@182434 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/TestWebKitAPI/Tests/mac/SetAndUpdateCacheModel.mm

index 3caa609..6ea1be6 100644 (file)
@@ -1,3 +1,14 @@
+2015-04-06  Alexey Proskuryakov  <ap@apple.com>
+
+        WebKit1.SetAndUpdateCacheModelPreferencesChangeMix fails on some machines
+        https://bugs.webkit.org/show_bug.cgi?id=143450
+
+        Reviewed by Anders Carlsson.
+
+        * TestWebKitAPI/Tests/mac/SetAndUpdateCacheModel.mm: (TestWebKitAPI::TEST):
+        Make sure that the view is actually closed, regardless of anything else that happens beneath.
+        Also, removed unnecessary get() calls.
+
 2015-04-03  Alexey Proskuryakov  <ap@apple.com>
 
         Reduce the dependency on Flash in regression tests
index 55fa29e..889c6d0 100644 (file)
@@ -74,29 +74,29 @@ TEST(WebKit1, SetAndUpdateCacheModelPreferencesChangeMix)
 
     [standardPreferences setCacheModel:WebCacheModelDocumentViewer];
     EXPECT_EQ((int)WebCacheModelDocumentViewer, (int)[WebView _cacheModel]);
-    [customPreferences.get() setCacheModel:WebCacheModelPrimaryWebBrowser];
+    [customPreferences setCacheModel:WebCacheModelPrimaryWebBrowser];
     EXPECT_EQ((int)WebCacheModelPrimaryWebBrowser, (int)[WebView _cacheModel]);
 
 
     // 2) The cache model should follow the highest value of cache model between the two preferences.
     RetainPtr<WebView> webView = adoptNS([[WebView alloc] initWithFrame:NSMakeRect(0, 0, 120, 200) frameName:nil groupName:nil]);
-    [webView.get() setPreferences:customPreferences.get()];
+    [webView setPreferences:customPreferences.get()];
     EXPECT_EQ((int)WebCacheModelPrimaryWebBrowser, (int)[WebView _cacheModel]);
 
-    [customPreferences.get() setCacheModel:WebCacheModelDocumentBrowser];
+    [customPreferences setCacheModel:WebCacheModelDocumentBrowser];
     EXPECT_EQ((int)WebCacheModelDocumentBrowser, (int)[WebView _cacheModel]);
 
     [standardPreferences setCacheModel:WebCacheModelPrimaryWebBrowser];
     EXPECT_EQ((int)WebCacheModelPrimaryWebBrowser, (int)[WebView _cacheModel]);
-    [customPreferences.get() setCacheModel:WebCacheModelDocumentViewer];
+    [customPreferences setCacheModel:WebCacheModelDocumentViewer];
     EXPECT_EQ((int)WebCacheModelPrimaryWebBrowser, (int)[WebView _cacheModel]);
 
     // 3) Resetting the view should fall back to standardPreferences.
     [standardPreferences setCacheModel:WebCacheModelDocumentViewer];
-    [customPreferences.get() setCacheModel:WebCacheModelPrimaryWebBrowser];
+    [customPreferences setCacheModel:WebCacheModelPrimaryWebBrowser];
     EXPECT_EQ((int)WebCacheModelPrimaryWebBrowser, (int)[WebView _cacheModel]);
 
-    webView.clear();
+    [webView close];
     EXPECT_EQ((int)WebCacheModelDocumentViewer, (int)[WebView _cacheModel]);
 }