Browse files

Added test case for checking if existing scripts (jQuery, Backbone, U…

…nderscore) are altered/overwritten by profiler
  • Loading branch information...
1 parent 1c23532 commit 1f77623f28b6ed50ccf6ba90665d6a9a7b53f95e @ToshB ToshB committed Jan 7, 2013
View
24 Samples/Raven.Sample.MvcIntegration/Views/Home/Index.cshtml
@@ -13,6 +13,30 @@
</div>
<script src="@Url.Content("~/Scripts/jquery.min.js")"></script>
+
+ <script>
+ $.originalVersion = true;
+ Backbone = { originalVersion: true };
+ _ = { originalVersion: true };
+ </script>
+
+ @Raven.Client.MvcIntegration.RavenProfiler.CurrentRequestSessions()
+
+ <script>
+ function checkScripts() {
+ if ($.originalVersion && Backbone.originalVersion && _.originalVersion) {
+ console.log('original scripts unchanged');
+ } else {
+ alert('Original scripts overwritten by profiler');
+ }
+ }
+
+ checkScripts();
+ $(function() {
+ checkScripts();
+ });
+ </script>
+
<script>
$('#singleGet').on('click', function() {
$.getJSON('@Url.Action("SingleSessionGet", "Home")');
View
1 Samples/Raven.Sample.MvcIntegration/Views/Shared/_Layout.cshtml
@@ -6,7 +6,6 @@
<title>@ViewBag.Title</title>
<link href="~/Content/bootstrap.css" rel="stylesheet" />
<link href="~/Content/Site.css" rel="stylesheet" />
- @Raven.Client.MvcIntegration.RavenProfiler.CurrentRequestSessions()
</head>
<body>
@RenderBody()

0 comments on commit 1f77623

Please sign in to comment.