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

Unified Diff: test/webkit/fast/js/kde/completion.js

Issue 21070002: Migrate more tests from blink repository. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 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
« no previous file with comments | « test/webkit/fast/js/kde/comment-2-expected.txt ('k') | test/webkit/fast/js/kde/completion-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/webkit/fast/js/kde/completion.js
diff --git a/test/webkit/fast/js/toString-exception.js b/test/webkit/fast/js/kde/completion.js
similarity index 76%
copy from test/webkit/fast/js/toString-exception.js
copy to test/webkit/fast/js/kde/completion.js
index 2a8b50c0fdd080deeb9a8115a04b9d3680bea08b..f75c98f4010d69f2c290f1e4bb3f0bd31a769815 100644
--- a/test/webkit/fast/js/toString-exception.js
+++ b/test/webkit/fast/js/kde/completion.js
@@ -21,23 +21,29 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-description(
-'This test checks for regression against <a href="https://bugs.webkit.org/show_bug.cgi?id=7343">7343: REGRESSION: fast/js/toString-overrides.html fails when run multiple times</a>.'
-);
+description("KDE JS Test");
+var i = 1;
-var a = [{ toString : 0 }];
-
-try {
- a.toString();
-} catch (e) {
+function foo() {
+ i = 2;
+ return;
+ i = 3;
}
-var caught = false;
-
-try {
- a.toString();
-} catch (e) {
-caught = true;
-}
+shouldBe("foo(), i", "2");
+var caught = false;
+try { eval("return;"); } catch(e) { caught = true; }
shouldBeTrue("caught");
+
+// value completions take precedence
+var val = eval("11; { }");
+shouldBe("val", "11");
+val = eval("12; ;");
+shouldBe("val", "12");
+val = eval("13; if(false);");
+shouldBe("val", "13");
+val = eval("14; function f() {}");
+shouldBe("val", "14");
+val = eval("15; var v = 0");
+shouldBe("val", "15");
« no previous file with comments | « test/webkit/fast/js/kde/comment-2-expected.txt ('k') | test/webkit/fast/js/kde/completion-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698