Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Commit

Permalink
Perf tests: Add test for measuring custom select enhancement.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel Schulhof committed Jun 23, 2013
1 parent 1a660a7 commit 90e9c2d
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
25 changes: 25 additions & 0 deletions tests/perf/select/index.html
Original file line number Diff line number Diff line change
@@ -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>
9 changes: 9 additions & 0 deletions tests/perf/select/perf.js
Original file line number Diff line number Diff line change
@@ -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.