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

Unified Diff: tests/html/history_test.dart

Issue 1414903007: Serialize the data argument to History's state-related APIs. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Add a TODO Created 5 years, 1 month 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 | « sdk/lib/html/dartium/html_dartium.dart ('k') | tools/dom/scripts/generator.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/html/history_test.dart
diff --git a/tests/html/history_test.dart b/tests/html/history_test.dart
index 893fb77db2a97de5526d563f84353e28949135f1..d801a72a76f6b64743a81f92014e95768aef9d32 100644
--- a/tests/html/history_test.dart
+++ b/tests/html/history_test.dart
@@ -34,6 +34,17 @@ main() {
}, expectation);
});
+ test('pushState with data', () {
+ expect(() {
+ window.history.pushState({'one' : 1}, document.title, '?dummy');
+ expect(window.history.state, equals({'one' : 1}));
+ window.history.pushState(null, document.title, '?foo=bar');
+
+ expect(window.location.href.endsWith('foo=bar'), isTrue);
+
+ }, expectation);
+ });
+
test('back', () {
expect(() {
window.history.pushState(null, document.title, '?dummy1');
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | tools/dom/scripts/generator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698