Skip to content
Browse files

Perf tests: Add test for measuring custom select enhancement.

  • Loading branch information...
1 parent 1a660a7 commit 90e9c2d715516626a1d11525028f80d4b7a011f5 @gabrielschulhof gabrielschulhof committed
Showing with 34 additions and 0 deletions.
  1. +25 −0 tests/perf/select/index.html
  2. +9 −0 tests/perf/select/perf.js
View
25 tests/perf/select/index.html
@@ -0,0 +1,25 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>Select Menu Perf Suite</title>
+ <script src="../../../js/jquery.tag.inserter.js"></script>
+ <script src="../benchmark.js"></script>
+ <link rel="stylesheet" href="../benchmark.css" />
+ <script src="../../../external/requirejs/require.js"></script>
+ <script src="../../../js/requirejs.config.js"></script>
+ <script src="perf.js"></script>
+ <link rel="stylesheet" href="../../../css/themes/default/jquery.mobile.css" />
+</head>
+<body>
+ <div id="fixtures">
+ <select>
+ <option value="o1">Option 1</option>
+ <option value="o2">Option 2</option>
+ <option value="o3">Option 3</option>
+ <option value="o4">Option 4</option>
+ </select>
+ </div>
+</body>
+</html>
View
9 tests/perf/select/perf.js
@@ -0,0 +1,9 @@
+require.config({ baseUrl: "../../../js" });
+
+// Require both the generic suite and the library to be tested for performance
+require( [ "../suite.js", "widgets/forms/select.custom" ], function( suite ) {
+ suite.add( "custom select enchancement", function() {
+ suite.fixtures.reset();
+ suite.fixtures.children().first().selectmenu( { nativeMenu: false } );
+ });
+});

0 comments on commit 90e9c2d

Please sign in to comment.
Something went wrong with that request. Please try again.