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

Unified Diff: Source/modules/serviceworkers/CacheTest.cpp

Issue 656073002: IDL: Use ALLOW_ONLY_INLINE_ALLOCATION() in dictionaries (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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
Index: Source/modules/serviceworkers/CacheTest.cpp
diff --git a/Source/modules/serviceworkers/CacheTest.cpp b/Source/modules/serviceworkers/CacheTest.cpp
index a2f3bc5c7a59333a0f98b7bdea852f283faec35e..3da3465c28a098b9361d6098ddbdc4e18da232c9 100644
--- a/Source/modules/serviceworkers/CacheTest.cpp
+++ b/Source/modules/serviceworkers/CacheTest.cpp
@@ -268,16 +268,16 @@ TEST_F(ServiceWorkerCacheTest, Basics)
const String url = "http://www.cachetest.org/";
- CacheQueryOptions* options = CacheQueryOptions::create();
- ScriptPromise matchPromise = cache->match(scriptState(), url, *options);
+ CacheQueryOptions options;
+ ScriptPromise matchPromise = cache->match(scriptState(), url, options);
EXPECT_EQ(kNotImplementedString, getRejectString(matchPromise));
cache = Cache::create(testCache = new ErrorWebCacheForTests(WebServiceWorkerCacheErrorNotFound));
- matchPromise = cache->match(scriptState(), url, *options);
+ matchPromise = cache->match(scriptState(), url, options);
EXPECT_EQ("NotFoundError: Entry was not found.", getRejectString(matchPromise));
cache = Cache::create(testCache = new ErrorWebCacheForTests(WebServiceWorkerCacheErrorExists));
- matchPromise = cache->match(scriptState(), url, *options);
+ matchPromise = cache->match(scriptState(), url, options);
EXPECT_EQ("InvalidAccessError: Entry already exists.", getRejectString(matchPromise));
}
@@ -297,27 +297,27 @@ TEST_F(ServiceWorkerCacheTest, BasicArguments)
expectedQueryParams.cacheName = "this is a cache name";
testCache->setExpectedQueryParams(&expectedQueryParams);
- CacheQueryOptions* options = CacheQueryOptions::create();
- options->setIgnoreVary(1);
- options->setCacheName(expectedQueryParams.cacheName);
+ CacheQueryOptions options;
+ options.setIgnoreVary(1);
+ options.setCacheName(expectedQueryParams.cacheName);
Request* request = newRequestFromUrl(url);
ASSERT(request);
- ScriptPromise matchResult = cache->match(scriptState(), request, *options);
+ ScriptPromise matchResult = cache->match(scriptState(), request, options);
EXPECT_EQ("dispatchMatch", testCache->getAndClearLastErrorWebCacheMethodCalled());
EXPECT_EQ(kNotImplementedString, getRejectString(matchResult));
- ScriptPromise stringMatchResult = cache->match(scriptState(), url, *options);
+ ScriptPromise stringMatchResult = cache->match(scriptState(), url, options);
EXPECT_EQ("dispatchMatch", testCache->getAndClearLastErrorWebCacheMethodCalled());
EXPECT_EQ(kNotImplementedString, getRejectString(stringMatchResult));
request = newRequestFromUrl(url);
ASSERT(request);
- ScriptPromise matchAllResult = cache->matchAll(scriptState(), request, *options);
+ ScriptPromise matchAllResult = cache->matchAll(scriptState(), request, options);
EXPECT_EQ("dispatchMatchAll", testCache->getAndClearLastErrorWebCacheMethodCalled());
EXPECT_EQ(kNotImplementedString, getRejectString(matchAllResult));
- ScriptPromise stringMatchAllResult = cache->matchAll(scriptState(), url, *options);
+ ScriptPromise stringMatchAllResult = cache->matchAll(scriptState(), url, options);
EXPECT_EQ("dispatchMatchAll", testCache->getAndClearLastErrorWebCacheMethodCalled());
EXPECT_EQ(kNotImplementedString, getRejectString(stringMatchAllResult));
@@ -327,11 +327,11 @@ TEST_F(ServiceWorkerCacheTest, BasicArguments)
request = newRequestFromUrl(url);
ASSERT(request);
- ScriptPromise keysResult2 = cache->keys(scriptState(), request, *options);
+ ScriptPromise keysResult2 = cache->keys(scriptState(), request, options);
EXPECT_EQ("dispatchKeys", testCache->getAndClearLastErrorWebCacheMethodCalled());
EXPECT_EQ(kNotImplementedString, getRejectString(keysResult2));
- ScriptPromise stringKeysResult2 = cache->keys(scriptState(), url, *options);
+ ScriptPromise stringKeysResult2 = cache->keys(scriptState(), url, options);
EXPECT_EQ("dispatchKeys", testCache->getAndClearLastErrorWebCacheMethodCalled());
EXPECT_EQ(kNotImplementedString, getRejectString(stringKeysResult2));
}
@@ -348,9 +348,9 @@ TEST_F(ServiceWorkerCacheTest, BatchOperationArguments)
expectedQueryParams.cacheName = "this is another cache name";
testCache->setExpectedQueryParams(&expectedQueryParams);
- CacheQueryOptions* options = CacheQueryOptions::create();
- options->setPrefixMatch(1);
- options->setCacheName(expectedQueryParams.cacheName);
+ CacheQueryOptions options;
+ options.setPrefixMatch(1);
+ options.setCacheName(expectedQueryParams.cacheName);
const String url = "http://batch.operations.test/";
Request* request = newRequestFromUrl(url);
@@ -370,11 +370,11 @@ TEST_F(ServiceWorkerCacheTest, BatchOperationArguments)
}
testCache->setExpectedBatchOperations(&expectedDeleteOperations);
- ScriptPromise deleteResult = cache->deleteFunction(scriptState(), request, *options);
+ ScriptPromise deleteResult = cache->deleteFunction(scriptState(), request, options);
EXPECT_EQ("dispatchBatch", testCache->getAndClearLastErrorWebCacheMethodCalled());
EXPECT_EQ(kNotImplementedString, getRejectString(deleteResult));
- ScriptPromise stringDeleteResult = cache->deleteFunction(scriptState(), url, *options);
+ ScriptPromise stringDeleteResult = cache->deleteFunction(scriptState(), url, options);
EXPECT_EQ("dispatchBatch", testCache->getAndClearLastErrorWebCacheMethodCalled());
EXPECT_EQ(kNotImplementedString, getRejectString(stringDeleteResult));
@@ -427,9 +427,9 @@ TEST_F(ServiceWorkerCacheTest, MatchResponseTest)
webResponse.setResponseType(WebServiceWorkerResponseTypeDefault);
Cache* cache = Cache::create(new MatchTestCache(webResponse));
- CacheQueryOptions* options = CacheQueryOptions::create();
+ CacheQueryOptions options;
- ScriptPromise result = cache->match(scriptState(), requestUrl, *options);
+ ScriptPromise result = cache->match(scriptState(), requestUrl, options);
ScriptValue scriptValue = getResolveValue(result);
Response* response = V8Response::toImplWithTypeCheck(isolate(), scriptValue.v8Value());
ASSERT_TRUE(response);
@@ -518,8 +518,8 @@ TEST_F(ServiceWorkerCacheTest, MatchAllAndBatchResponseTest)
Cache* cache = Cache::create(new MatchAllAndBatchTestCache(webResponses));
- CacheQueryOptions* options = CacheQueryOptions::create();
- ScriptPromise result = cache->matchAll(scriptState(), "http://some.url/", *options);
+ CacheQueryOptions options;
+ ScriptPromise result = cache->matchAll(scriptState(), "http://some.url/", options);
ScriptValue scriptValue = getResolveValue(result);
NonThrowableExceptionState exceptionState;
@@ -532,7 +532,7 @@ TEST_F(ServiceWorkerCacheTest, MatchAllAndBatchResponseTest)
EXPECT_EQ(expectedUrls[i], response->url());
}
- result = cache->deleteFunction(scriptState(), "http://some.url/", *options);
+ result = cache->deleteFunction(scriptState(), "http://some.url/", options);
scriptValue = getResolveValue(result);
EXPECT_TRUE(scriptValue.v8Value()->IsBoolean());
EXPECT_EQ(true, scriptValue.v8Value()->BooleanValue());
« no previous file with comments | « Source/modules/serviceworkers/CacheQueryOptions.idl ('k') | Source/modules/serviceworkers/RegistrationOptions.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698